home *** CD-ROM | disk | FTP | other *** search
- // Copyright (C) 1997-2002 Alias|Wavefront,
- // a division of Silicon Graphics Limited.
- //
- // The information in this file is provided for the exclusive use of the
- // licensees of Alias|Wavefront. Such users have the right to use, modify,
- // and incorporate this code into other products for purposes authorized
- // by the Alias|Wavefront license agreement, without fee.
- //
- // ALIAS|WAVEFRONT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
- // INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
- // EVENT SHALL ALIAS|WAVEFRONT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
- // CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
- // DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
- // TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
- // PERFORMANCE OF THIS SOFTWARE.
- //
- //
- // Alias|Wavefront Script File
- // MODIFY THIS AT YOUR OWN RISK
- //
- // Creation Date: 17 June 1997
- //
- // Author: gf
- //
- // Description:
- // This implements the SelectionObject Mask Marking Menu.
- //
-
-
- global proc doSelectObjectMM()
- {
-
- // Handles
- //
- int $maskResult = ( `selectType -q -handle` +
- `selectType -q -ikHandle` );
-
- menuItem -rp "N" -l "Handles" -subMenu true;
- menuItem -rp "N" -l "All Handles"
- -cb $maskResult
- -c "setObjectPickMask \"Marker\" #1";
- menuItem -rp "E" -l "Selection Handles"
- -cb `selectType -q -handle`
- -c "selectType -handle #1";
- menuItem -rp "W" -l "IK Handles"
- -cb `selectType -q -ikHandle`
- -c "selectType -ikHandle #1";
- setParent -m ..;
-
-
- // Joints
- //
- menuItem -rp "NE" -l "Joints"
- -cb `selectType -q -joint`
- -c "selectType -joint #1";
-
-
- // Curves
- //
- menuItem -rp "E" -l "Curves" -subMenu true;
- menuItem -rp "E" -l "All Curves"
- -cb (`selectType -q -nurbsCurve` +
- `selectType -q -cos` )
- -c "setObjectPickMask \"Curve\" #1";
- menuItem -rp "N" -l "NURBS Curves"
- -cb `selectType -q -nurbsCurve`
- -c "selectType -nurbsCurve #1";
- menuItem -rp "S" -l "Curves On Surface"
- -cb `selectType -q -cos`
- -c "selectType -cos #1";
- setParent -m ..;
-
-
- // Surfaces
- //
- menuItem -rp "SE" -l "Surfaces" -subMenu true;
- menuItem -rp "SE" -l "All Surfaces"
- -cb (`selectType -q -nurbsSurface` +
- `selectType -q -polymesh` +
- `selectType -q -plane` )
- -c "setObjectPickMask \"Surface\" #1";
- menuItem -rp "SW" -l "NURBS Surfaces"
- -cb `selectType -q -nurbsSurface`
- -c "selectType -nurbsSurface #1";
- menuItem -rp "NW" -l "Poly Surfaces"
- -cb `selectType -q -polymesh`
- -c "selectType -polymesh #1";
- menuItem -rp "NE" -l "Planes"
- -cb `selectType -q -plane`
- -c "selectType -plane #1";
- setParent -m ..;
-
-
- // Deformations
- //
- menuItem -rp "S" -l "Deformations" -subMenu true;
- menuItem -rp "S" -l "All Deformations"
- -cb (`selectType -q -lattice` +
- `selectType -q -cluster` +
- `selectType -q -sculpt` +
- `selectType -q -nonlinear` )
- -c "setObjectPickMask \"Deformer\" #1";
- menuItem -rp "W" -l "Lattices"
- -cb `selectType -q -lattice`
- -c "selectType -lattice #1";
- menuItem -rp "N" -l "Clusters"
- -cb `selectType -q -cluster`
- -c "selectType -cluster #1";
- menuItem -rp "E" -l "Nonlinears"
- -cb `selectType -q -nonlinear`
- -c "selectType -nonlinear #1";
- menuItem -rp "SW" -l "Sculpt Objects"
- -cb `selectType -q -sculpt`
- -c "selectType -sculpt #1";
- setParent -m ..;
-
-
- // Dynamics
- //
- int $allDyn;
- if( fluidEditLicenseFound() ) {
- $allDyn = ( `selectType -q -particleShape` +
- `selectType -q -emitter` +
- `selectType -q -field` +
- `selectType -q -fluid` +
- `selectType -q -spring` +
- `selectType -q -rigidBody` +
- `selectType -q -rigidConstraint` );
- } else {
- $allDyn = ( `selectType -q -particleShape` +
- `selectType -q -emitter` +
- `selectType -q -field` +
- `selectType -q -spring` +
- `selectType -q -rigidBody` +
- `selectType -q -rigidConstraint` );
- }
-
- menuItem -rp "SW" -l "Dynamics" -subMenu true;
- menuItem -rp "SW" -l "All Dynamics"
- -cb $allDyn
- -c "setObjectPickMask \"Dynamic\" #1";
- menuItem -rp "W" -l "Particles"
- -cb `selectType -q -particleShape`
- -c "selectType -particleShape #1";
- menuItem -rp "NW" -l "Emitters"
- -cb `selectType -q -emitter`
- -c "selectType -emitter #1";
- menuItem -rp "N" -l "Fields"
- -cb `selectType -q -field`
- -c "selectType -field #1";
- menuItem -rp "NE" -l "Springs"
- -cb `selectType -q -spring`
- -c "selectType -spring #1";
- menuItem -rp "E" -l "Rigid Bodies"
- -cb `selectType -q -rigidBody`
- -c "selectType -rigidBody #1";
- menuItem -rp "SE" -l "Rigid Constraints"
- -cb `selectType -q -rigidConstraint`
- -c "selectType -rigidConstraint #1";
-
- // Only post fluids part of MM if have license
- //
- if( fluidEditLicenseFound() ) {
- menuItem -rp "S" -l "Fluids"
- -cb `selectType -q -fluid`
- -c "selectType -fluid #1";
- }
-
- setParent -m ..;
-
-
- // Rendering
- //
- menuItem -rp "W" -l "Rendering" -subMenu true;
- menuItem -rp "W" -l "All Rendering"
- -cb (`selectType -q -light` +
- `selectType -q -camera` +
- `selectType -q -texture` )
- -c "setObjectPickMask \"Rendering\" #1";
- menuItem -rp "N" -l "Lights"
- -cb `selectType -q -light`
- -c "selectType -light #1";
- menuItem -rp "E" -l "Cameras"
- -cb `selectType -q -camera`
- -c "selectType -camera #1";
- menuItem -rp "S" -l "Textures"
- -cb `selectType -q -texture`
- -c "selectType -texture #1";
- setParent -m ..;
-
-
- // Misc.
- //
- menuItem -rp "NW" -l "Misc." -subMenu true;
- menuItem -rp "NW" -l "All Misc."
- -cb (`selectType -q -ikEndEffector` +
- `selectType -q -locator` +
- `selectType -q -dimension` )
- -c "setObjectPickMask \"Other\" #1";
- menuItem -rp "NE" -l "IK End Effectors"
- -cb `selectType -q -ikEndEffector`
- -c "selectType -ikEndEffector #1";
- menuItem -rp "SE" -l "Locators"
- -cb `selectType -q -locator`
- -c "selectType -locator #1";
- menuItem -rp "SW" -l "Dimensions"
- -cb `selectType -q -dimension`
- -c "selectType -dimension #1";
- setParent -m ..;
-
- // Overflow
- //
-
- // prevent multiple copies from getting appended, each
- // time this MM is posted..
- //
- if( !`menuItem -exists buildSelectObjectMM_allOnItem` ) {
- menuItem -l "All Objects on" -c "setObjectPickMask \"All\" 1"
- buildSelectObjectMM_allOnItem;
- menuItem -l "All Objects off" -c "setObjectPickMask \"All\" 0";
- menuItem -d true;
- menuItem -l "Save to shelf" -c "saveObjectMaskToShelf";
- menuItem -d true;
- menuItem -l "Select Components" -c "selectMode -component";
- setParent -m ..;
- }
- }
-
-
- global proc buildSelectObjectMM( )
- //
- // Creates a marking menu that allows the user
- // to select Object masks - reuses
- // the name tempMM for the name of the menu, to
- // ensure that there's only one of these at
- // any one time.
- {
-
- if( `popupMenu -exists tempMM` )
- {
- deleteUI tempMM;
- }
-
- global string $gSelect;
- setToolTo $gSelect;
-
- selectMode -object;
-
- popupMenu -mm 1 -b 1 -aob 1 -p viewPanes -pmc "doSelectObjectMM" tempMM;
-
-
- }
-